package cn.paul.wechatshop.dto;

import cn.paul.wechatshop.entity.OrderDetail;
import cn.paul.wechatshop.utils.serializer.Date2LongSerializer;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.google.common.collect.Lists;
import lombok.Data;

import javax.persistence.Id;
import javax.persistence.Transient;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @author 徐凌峰
 * @date 2017/12/13 0013
 */
@Data
//@JsonInclude(value = JsonInclude.Include.NON_NULL)
public class OrderDTO {

    private String orderId;

    private String buyerName;

    private String buyerPhone;

    private String buyerAddress;
    /**
     * 微信ID
     */
    private String buyerOpenid;

    private BigDecimal orderAmount;
    //默认值为0.新下单
    private Integer orderStatus;
    @JsonSerialize(using = Date2LongSerializer.class)

    private Date createTime;
    @JsonSerialize(using = Date2LongSerializer.class)

    private Date updateTime;

    private List<OrderDetail> orderDetailList = Lists.newArrayList();
}
